class Solution:
    def sortColors(self, nums) :
        """
        Do not return anything, modify nums in-place instead.
        """
        i = -1
        j = len(nums)
        t = 0
        while t<j:
            if nums[t] < 1:
                i = i+1
                temp = nums[i]
                nums[i] = nums[t]
                nums[t] = temp
                t = t+1
            elif nums[t]>1:
                 j = j-1
                 temp = nums[j]
                 nums[j] = nums[t]
                 nums[t] = temp
            else:
                t = t+1
        return nums

if __name__ == '__main__':
    S = Solution()
    nums = S.sortColors([2,0,2,1,1,0])
    print(nums)


